//*********************************************************
//
//    Copyright (c) Microsoft. All rights reserved.
//    This code is licensed under the Apache License, Version 2.0.
//    THIS CODE IS PROVIDED *AS IS* WITHOUT WARRANTY OF
//    ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY
//    IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR
//    PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.
//
//*********************************************************

namespace Microsoft.Research.ProvenanceCommon.Model
{
    using System;
    using System.Collections.ObjectModel;

    public class InputOutputModel
    {
        /// <summary>
        /// Get InputProperties
        /// </summary>
        public ObservableCollection<ActivityProperty> InputProperties { get; private set; }

        /// <summary>
        /// Get OutputProperties
        /// </summary>
        public ObservableCollection<ActivityProperty> OutputProperties { get; private set; }

        /// <summary>
        /// Get and Set Name
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// Get and Set Label
        /// </summary>
        public string Label { get; set; }

        /// <summary>
        /// Constructor
        /// </summary>
        public InputOutputModel()
        {
            this.InputProperties = new ObservableCollection<ActivityProperty>();
            this.OutputProperties = new ObservableCollection<ActivityProperty>();
        }

        /// <summary>
        /// Overridden tostring method. For automation Ids.
        /// </summary>
        /// <returns>The string representation of the object.</returns>
        public override string ToString()
        {
            if (!string.IsNullOrEmpty(this.Name))
            {
                return this.Name;
            }
            return base.ToString();
        }
    }
}
